//
// Created by benxb on 2021/12/8.
//

#include <gtest/gtest.h>
#include <storage/disk/data_chunk_delete_bitmap.h>
#include <cstdio>

TEST(DiskTest, DeletBitMapTest) {
    benxdb::DataChunkDeleteBitmap bitmap("test");
    bitmap.AppendChunk();
    bitmap.DeleteRecord(24);
    ASSERT_EQ(bitmap.IsDelete(24), true);
    ASSERT_EQ(bitmap.IsDelete(25), false);
    remove(bitmap.BitmapFile().data());
}

int main(int argc, char **argv) {
    testing::InitGoogleTest(&argc,argv);
    return RUN_ALL_TESTS();
}